package com.siyu.basedata.pptnrfuture.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.siyu.basedata.pptnrfuture.domain.PptnRFuture;
import com.siyu.basedata.pptnrfuture.mapper.PptnRFutureMapper;
import com.siyu.basedata.pptnrfuture.service.IPptnRFutureService;
import com.siyu.basedata.pptnrlaste.domain.PptnRLaste;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 雨量历史数据Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-20
 */
@Service
public class PptnRFutureServiceImpl extends ServiceImpl<PptnRFutureMapper, PptnRFuture> implements IPptnRFutureService {
    @Autowired
    private PptnRFutureMapper pptnRFutureMapper;

    /**
     * 查询雨量历史数据
     *
     * @param stcd 雨量历史数据主键
     * @return 雨量历史数据
     */
    @Override
    public PptnRFuture selectPptnRFutureByStcd(String stcd) {
        return pptnRFutureMapper.selectPptnRFutureByStcd(stcd);
    }

    /**
     * 查询雨量历史数据列表
     *
     * @param pptnRFuture 雨量历史数据
     * @return 雨量历史数据
     */
    @Override
    public List<PptnRFuture> selectPptnRFutureList(PptnRFuture pptnRFuture) {
        return pptnRFutureMapper.selectPptnRFutureList(pptnRFuture);
    }

    /**
     * 新增雨量历史数据
     *
     * @param pptnRFuture 雨量历史数据
     * @return 结果
     */
    @Override
    public int insertPptnRFuture(PptnRFuture pptnRFuture) {
        return pptnRFutureMapper.insertPptnRFuture(pptnRFuture);
    }

    /**
     * 修改雨量历史数据
     *
     * @param pptnRFuture 雨量历史数据
     * @return 结果
     */
    @Override
    public int updatePptnRFuture(PptnRFuture pptnRFuture) {
        return pptnRFutureMapper.updatePptnRFuture(pptnRFuture);
    }

    /**
     * 批量删除雨量历史数据
     *
     * @param stcds 需要删除的雨量历史数据主键
     * @return 结果
     */
    @Override
    public int deletePptnRFutureByStcds(String[] stcds) {
        return pptnRFutureMapper.deletePptnRFutureByStcds(stcds);
    }

    /**
     * 删除雨量历史数据信息
     *
     * @param stcd 雨量历史数据主键
     * @return 结果
     */
    @Override
    public int deletePptnRFutureByStcd(String stcd) {
        return pptnRFutureMapper.deletePptnRFutureByStcd(stcd);
    }

    @Override
    public List<PptnRFuture> getpreRainfallData(String startTime, String endTime, String step, String stcd) {
        return pptnRFutureMapper.selectAreaRain(startTime, endTime, step, stcd);
    }
}


